home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2002 January / january_2002.iso / Piposh Special / Piposh / WEST1.DXR / 00141_KEYS.ls < prev    next >
Encoding:
Text File  |  2004-12-06  |  4.9 KB  |  133 lines

  1. on westup
  2.   global ppl, mnv, fxpath, bullets, blty, bltx, bltsprite, bltwich
  3.   if the keyCode > 122 then
  4.     case the keyCode of
  5.       123:
  6.         set the member of sprite getAt(ppl, 1) to member(43, 1)
  7.       124:
  8.         set the member of sprite getAt(ppl, 1) to member(43, 1)
  9.       125:
  10.         set the member of sprite getAt(ppl, 1) to member(37, 1)
  11.       126:
  12.         set the member of sprite getAt(ppl, 1) to member(36, 1)
  13.     end case
  14.     setAt(mnv, 1, 1)
  15.   else
  16.     if (the keyCode = 49) and (getAt(mnv, 1) = 1) then
  17.       case the memberNum of sprite getAt(ppl, 1) of
  18.         43:
  19.           set the member of sprite getAt(ppl, 1) to member(44, 1)
  20.         37:
  21.           set the member of sprite getAt(ppl, 1) to member(38, 1)
  22.         36:
  23.           set the member of sprite getAt(ppl, 1) to member(49, 1)
  24.       end case
  25.       sound playFile 1, fxpath & "mashot.aif"
  26.       setAt(mnv, 1, 6)
  27.       h = 1
  28.       repeat while (h <> "ok") and (h <> "notok")
  29.         if the loc of sprite (49 + h) = point(690, 490) then
  30.           setAt(bltsprite, count(bltx) + 1, 49 + h)
  31.           h = "ok"
  32.           next repeat
  33.         end if
  34.         if h = 16 then
  35.           h = "notok"
  36.           next repeat
  37.         end if
  38.         h = h + 1
  39.       end repeat
  40.       if sprite(10).visible = 1 then
  41.         if the memberNum of sprite getAt(ppl, 1) <> 38 then
  42.           h = "notok"
  43.         end if
  44.       end if
  45.       if h = "ok" then
  46.         setAt(bltwich, count(bltx) + 1, "good")
  47.         if (the memberNum of sprite getAt(ppl, 1) = 44) and (sprite(getAt(ppl, 1)).flipH = 1) then
  48.           setAt(bltx, count(bltx) + 1, 20)
  49.           setAt(blty, count(blty) + 1, 0)
  50.           set the locH of sprite getAt(bltsprite, count(bltx)) to the locH of sprite getAt(ppl, 1)
  51.           set the locV of sprite getAt(bltsprite, count(bltx)) to the locV of sprite getAt(ppl, 1) - 40
  52.         else
  53.           if (the memberNum of sprite getAt(ppl, 1) = 44) and (sprite(getAt(ppl, 1)).flipH = 0) then
  54.             setAt(bltx, count(bltx) + 1, -20)
  55.             setAt(blty, count(blty) + 1, 0)
  56.             set the locH of sprite getAt(bltsprite, count(bltx)) to the locH of sprite getAt(ppl, 1)
  57.             set the locV of sprite getAt(bltsprite, count(bltx)) to the locV of sprite getAt(ppl, 1) - 40
  58.           else
  59.             if the memberNum of sprite getAt(ppl, 1) = 38 then
  60.               setAt(bltx, count(bltx) + 1, 0)
  61.               setAt(blty, count(blty) + 1, 15)
  62.               set the locH of sprite getAt(bltsprite, count(bltx)) to the locH of sprite getAt(ppl, 1) - 27
  63.               set the locV of sprite getAt(bltsprite, count(bltx)) to the locV of sprite getAt(ppl, 1) - 44
  64.             else
  65.               setAt(bltx, count(bltx) + 1, 0)
  66.               setAt(blty, count(blty) + 1, -15)
  67.               set the locH of sprite getAt(bltsprite, count(bltx)) to the locH of sprite getAt(ppl, 1) + 27
  68.               set the locV of sprite getAt(bltsprite, count(bltx)) to the locV of sprite getAt(ppl, 1) - 80
  69.             end if
  70.           end if
  71.         end if
  72.         updateStage()
  73.       end if
  74.     end if
  75.   end if
  76. end
  77.  
  78. on westdown
  79.   global fxpath, ppl, mnv
  80.   if the keyCode > 122 then
  81.     if the memberNum of sprite getAt(ppl, 1) > 35 then
  82.       case the keyCode of
  83.         123:
  84.           set the member of sprite getAt(ppl, 1) to member(2, 1)
  85.         124:
  86.           set the member of sprite getAt(ppl, 1) to member(2, 1)
  87.         125:
  88.           set the member of sprite getAt(ppl, 1) to member(12, 1)
  89.         126:
  90.           set the member of sprite getAt(ppl, 1) to member(24, 1)
  91.       end case
  92.       setAt(mnv, 1, 100)
  93.     end if
  94.     case the keyCode of
  95.       123:
  96.         sprite(getAt(ppl, 1)).flipH = 0
  97.       124:
  98.         sprite(getAt(ppl, 1)).flipH = 1
  99.     end case
  100.     if sprite getAt(ppl, 1) intersects 25 and (sprite(10).visible = 0) and (the keyCode = 126) then
  101.       sprite(9).visible = 1
  102.       sprite(2).visible = 1
  103.       set the constraint of sprite 8 to 22
  104.       go(marker(0))
  105.     else
  106.       if sprite getAt(ppl, 1) intersects 25 and (sprite(10).visible = 1) and (the keyCode = 125) then
  107.         sprite(10).visible = 0
  108.         sprite(3).visible = 1
  109.         set the constraint of sprite 8 to 21
  110.         set the locV of sprite 8 to the locV of sprite 8 + 18
  111.         go(marker(0))
  112.       else
  113.         if sprite getAt(ppl, 1) intersects 24 and (sprite(10).visible = 0) and (the keyCode = 126) then
  114.           sprite(10).visible = 1
  115.           set the constraint of sprite 8 to 23
  116.           set the locV of sprite 8 to the locV of sprite 8 - 18
  117.           go(marker(0))
  118.         else
  119.           if sprite getAt(ppl, 1) intersects 24 and (sprite(10).visible = 1) and (the keyCode = 125) then
  120.             sprite(10).visible = 0
  121.             set the constraint of sprite 8 to 21
  122.             set the locV of sprite 8 to the locV of sprite 8 + 5
  123.             go(marker(0))
  124.           end if
  125.         end if
  126.       end if
  127.     end if
  128.   else
  129.     if (the keyCode = 49) and (getAt(mnv, 1) > 10) then
  130.     end if
  131.   end if
  132. end
  133.